package com.wish.finance.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wish.finance.entity.TJrFactoringDetail;
import com.wish.finance.entity.vo.FactoringVo;
import com.wish.finance.mapper.TJrFactoringDetailMapper;
import com.wish.finance.service.ITJrFactoringDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author benjamin
 * @since 2022-04-04
 */
@Service
public class TJrFactoringDetailServiceImpl extends ServiceImpl<TJrFactoringDetailMapper, TJrFactoringDetail> implements ITJrFactoringDetailService {

    @Override
    public PageInfo<FactoringVo> detailList(FactoringVo vo) {
        PageHelper.startPage(vo.getPageNum(), vo.getPageSize());
        List<FactoringVo> list = getBaseMapper().detailList(vo);
        PageInfo<FactoringVo> pg = new PageInfo<>(list);
        return pg;
    }

    @Override
    public List<FactoringVo> exportExcel(FactoringVo vo) {
        return getBaseMapper().detailList(vo);
    }
}
